# Maintainer: yuhldr <yuhldr@gmail.com>
pkgname=@APP_NAME@
pkgver=@VERSION@
pkgrel=1
pkgdesc="@APP_DES@"
arch=('any')
url="@PACKAGE_URL@"
license=('GPL3')
depends=(@DEPS@)
makedepends=(@BUILD_DEPS@)
optdepends=('python-pytesseract: for tesseract ocr support', 'tesseract-data-eng: for tesseract ocr support by en', 'tesseract-data-chi_sim: for tesseract ocr support by chi_sim')
checkdepends=('appstream-glib')
source=(${url}/archive/refs/tags/v${pkgver}.zip)
sha256sums=("SKIP")


build() {
  cd ${pkgname}-${pkgver}
  meson setup _build --prefix="/usr" -Dbuild_type=@BUILD_TYPE@
  meson compile -C _build
}

check() {
  cd ${pkgname}-${pkgver}
  meson test -C _build --print-errorlogs
}

package() {
  cd ${pkgname}-${pkgver}
  meson install -C _build --destdir "$pkgdir"
}
